/*
 * Ngramprob.h
 *
 *  Created on: Dec 3, 2014
 *      Author: ale
 */
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <string>
#include <map>
#include <sparsehash/sparse_hash_map>
using namespace std;

#ifndef PRED_NGRAMPROB_H_
#define PRED_NGRAMPROB_H_


class Ngramprob {
public:
	//std::map <string, pair<unsigned long int, unsigned long int>> tabla;

	void agregarNgrama(string ngrama, float prob, float boff);
	float obtenerProbabilidad(string ngrama);
	float obtenerBackOff(string ngrama);
	unsigned long int obtenerCantNGramas() {return cantNGramas;}
	Ngramprob();
	virtual ~Ngramprob();

private:
	unsigned long int cantNGramas;

	google::sparse_hash_map<std::string, pair<double, double> > tabla;
};


#endif /* PRED_NGRAMPROB_H_ */
